﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace MedievalGameProject
{
    public struct WeaponAttributes
    {
        public int damage;
        public int shotSpeed;
    }

    public class Weapon
    {
        public Character owner;
        protected BasicModel model;
        protected Matrix modelOffset;
        protected Matrix world;
        protected Vector3 modelOffsetVec3;

        public WeaponAttributes wa;

        public Weapon(Game game, Character owner)
        {
            this.owner = owner;
            model = null; //sub class should assign this in constructor
            modelOffset = Matrix.Identity; //sub class should assign this in constructor
        }

        public virtual void Draw(GameTime gameTime)
        {
            model.worldRotation = owner.model.worldRotation;
            model.worldTranslation = owner.model.worldTranslation;

            world = Matrix.CreateScale(model.scale) * modelOffset *
                model.worldRotation * model.worldTranslation;

            model.Draw(world);
        }

        public virtual void BeginFire()
        {

        }

        public virtual void BeginFire(Vector3 position, Vector3 direction, float speed)
        {

        }

        public virtual void EndFire()
        {

        }
    }
}
